package org.jactao.common;

/**
 * Created by fanzetao on 2018/4/10.
 */
public class LServiceConfig {

    private Class interfaceClass;
    private Object impl;
    private String version = LConstants.defaultVersion;

    public Class getInterfaceClass() {
        return interfaceClass;
    }

    public void setInterfaceClass(Class interfaceClass) {
        this.interfaceClass = interfaceClass;
    }

    public Object getImpl() {
        return impl;
    }

    public void setImpl(Object impl) {
        this.impl = impl;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public void checkRequired() {
        if(interfaceClass == null)
            throw new LException("interfaceClass not null");

        if(impl == null)
            throw new LException("service impl not null");
    }
}
